<template>
  <div class="reportFormPage">
    <!--    <topOperation/>-->
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">填料塑性指数试验检测记录表</div>
        <div class="codeText">
          <tr>
            JGLQ02030
          </tr>

        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>记录编号：</span>
          <span class="placeholder">{{ form.jilbh }}</span>
        </div>
      </div>
      <div class="table-border">
        <!-- .........................1111111111111111111111111111111......................................................... -->
        <table height="220px" class="top-table">
          <tbody>
          <tr>
            <td height="30" align="center" width="15%">
              <span style="width: 90px; display: inline-block">工程名称</span>
            </td>
            <td width="35%" class="text-center">
              <span>{{ form.gongcmc }}</span>
            </td>
            <td align="center" width="15%">
              <span style="width: 90px; display: inline-block">工程部位/用途</span>
            </td>
            <td width="35%" class="text-center">
              <span>{{ form.gongcbwyt }}</span>
            </td>
          </tr>
          <tr>
            <td height="50" align="center">样品信息</td>
            <td class="specimen-border" colspan="3">
              <span>样品名称：</span>
              <span :class="{ placeholder: !form.yangpmc }">{{ form.yangpmc }}</span>
              <span>；样品编号：</span>
              <span :class="{ 'placeholder-long': !form.yangpbh }">{{ form.yangpbh }}</span>

              <span>；样品数量：</span>
              <span :class="{ placeholder: !form.yangpsl }">{{ form.yangpsl }}</span>
              <span>；样品状态：</span>
              <span :class="{ placeholder: !form.yangpzt }">{{ form.yangpzt }}</span>
              <span>；来样时间：</span>
              <span :class="{ placeholder: !form.yangpsj }">{{ form.yangpsj }}</span>
            </td>
          </tr>

          <tr>
            <td height="25" align="center" width="15%">
              <span style="width: 90px; display: inline-block">试验检测日期</span>
            </td>
             <!-- <td width="35%" class="text-center">{{ form.shiyjcrq }}</td> -->                                            
 <td width="35%" class="text-center">
      <el-input v-model="form.shiyjcrq" />
</td>
            <td align="center" width="15%">
              <span style="width: 90px; display: inline-block">试验条件</span>
            </td>
            <td v-if="isPdf" width="35%">
              温度：
              <span style="display: inline-block; width: 10%">{{ form.shiytjwd }}</span>
              ℃；湿度：
              <span style="display: inline-block; width: 10%">{{ form.shiytjsd }}</span
              >%RH
            </td>
            <td v-else width="35%">
              温度：
              <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjwd" style="width: 15%"/>
              ℃；湿度：
              <el-input :type="isPdf ? 'string' : 'number'" v-model="form.shiytjsd" style="width: 15%"/>
              %RH
            </td>
          </tr>

          <tr>
            <td height="50" align="center" width="15%">
              <span style="width: 90px; display: inline-block">检测依据</span>
            </td>
            <td width="35%">
              <span v-if="isPdf">{{ form.jiancyj }}</span>
              <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark"
                        @dblclick.native="showBsJiancyjView"/>
            </td>
            <td align="center" width="15%">
              <span style="width: 90px; display: inline-block">判定依据</span>
            </td>
            <td width="35%">
              <span v-if="isPdf">{{ form.pandyj }}</span>
              <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView"
                        @focus="handleFocus('pandyj')" class="mark"/>
            </td>
          </tr>
          <tr class="bottom-border">
            <td height="50" align="center">
              <div>主要仪器设备</div>
              <div>名称及编号</div>
            </td>
            <td colspan="3">
              <span v-if="isPdf">{{ form.zhuyyqsbmcjbh }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark"
                        @dblclick.native="showBsInstrumentView"></el-input>
            </td>
          </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="500px" class="middle-table">
          <tbody>
          <tr trindex="0">
            <td colspan="3">样品缩分方法</td>
            <td colspan="9">
              <!-- <el-input v-model="form.yangpsfff"/> -->
              <el-select clearable v-model="form.yangpsfff" class="hide-icon width100 height100" placeholder>
                  <el-option label="分料器法" value="分料器法"></el-option>
                  <el-option label="分铲法" value="分铲法"></el-option>
                  <el-option label="四分法" value="四分法"></el-option>
                </el-select>
            </td>
          </tr>
          <tr trindex="1">
            <td colspan="12">液限(**注意有盒号**)</td>
          </tr>
          <tr trindex="2">
            <td colspan="1" rowspan="1" class="td1">试验<br>次数</td>
            <td colspan="1" rowspan="1" class="td1">击数<br>（次）</td>
            <td colspan="1" rowspan="1" class="td1">盒号</td>
            <td colspan="1" rowspan="1" class="td1">盒质量（g）</td>
            <td colspan="1" rowspan="1" class="td1">盒+湿试样质量（g）</td>
            <td colspan="1" rowspan="1" class="td1">盒+干试样质量（g）</td>
            <td colspan="1" rowspan="1" class="td1">水分质量（g）</td>
            <td colspan="1" rowspan="1" class="td1">干土质量（g）</td>
            <td colspan="1" rowspan="1" class="td1">含水率（%）</td>
            <td colspan="1" rowspan="1" class="td1">液限（%）</td>
            <td colspan="2" rowspan="1" class="td1">液限测定值（%）</td>
          </tr>
          <tr trindex="3">
            <td rowspan="3" class="td1">
              <el-input v-model="form.shiycs1"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].jis"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].heh"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].hezl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].hejssyzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].hejgsyzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].shuifzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].gantzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[0].hansl"></el-input>
            </td>
            <td rowspan="3" class="td1">
              <el-input v-model="form.yex1"></el-input>
            </td>
            <td rowspan="6" colspan="2" class="td2">
              <el-input v-model="form.yexcdz"></el-input>
            </td>
          </tr>
          <tr trindex="4">
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].jis"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].hezl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].hejssyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[1].hansl"></el-input>
            </td>
          </tr>
          <tr trindex="5">
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].jis"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].hezl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].hejssyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[2].hansl"></el-input>
            </td>
          </tr>

          <tr trindex="6">
            <td rowspan="3" class="td1">
              <el-input v-model="form.shiycs2"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].jis"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].heh"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].hezl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].hejssyzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].hejgsyzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].shuifzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].gantzl"></el-input>
            </td>
            <td class="td1">
              <el-input v-model="form.baDetailVos1[3].hansl"></el-input>
            </td>
            <td rowspan="3" class="td1">
              <el-input v-model="form.yex2"></el-input>
            </td>
          </tr>
          <tr trindex="7">
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].jis"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].hezl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].hejssyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[4].hansl"></el-input>
            </td>
          </tr>
          <tr trindex="8">
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].jis"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].hezl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].hejssyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos1[5].hansl"></el-input>
            </td>
          </tr>

          <tr trindex="9">
            <td colspan="12">图预留位置</td>
          </tr>
          <tr trindex="10">
            <td colspan="12">塑限(**注意有盒号**)</td>
          </tr>
          <tr trindex="11">
            <td colspan="1">试验<br>次数</td>
            <td colspan="1">盒号</td>
            <td colspan="1">盒质量（g）</td>
            <td colspan="2">盒+湿试样质量（g）</td>
            <td colspan="2">盒+干试样质量（g）</td>
            <td colspan="1">水分质量（g）</td>
            <td colspan="1">干土质量（g）</td>
            <td colspan="1">塑限（%）</td>
            <td colspan="2">平均塑限（%）</td>
          </tr>
          <tr trindex="12">
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].shiycs"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].hezl"></el-input>
            </td>
            <td colspan="2">
              <el-input v-model="form.baDetailVos2[0].hejssyzl"></el-input>
            </td>
            <td colspan="2">
              <el-input v-model="form.baDetailVos2[0].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[0].sux"></el-input>
            </td>
            <td rowspan="2" colspan="2">
              <el-input v-model="form.pingjsx"></el-input>
            </td>
          </tr>
          <tr trindex="13">
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].shiycs"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].heh"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].hezl"></el-input>
            </td>
            <td colspan="2">
              <el-input v-model="form.baDetailVos2[1].hejssyzl"></el-input>
            </td>
            <td colspan="2">
              <el-input v-model="form.baDetailVos2[1].hejgsyzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].shuifzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].gantzl"></el-input>
            </td>
            <td colspan="1">
              <el-input v-model="form.baDetailVos2[1].sux"></el-input>
            </td>
          </tr>
          <tr trindex="14">
            <td colspan="3">塑性指数（%）</td>
            <td colspan="9">
              <el-input v-model="form.suxzs"/>
            </td>
          </tr>

          </tbody>
        </table>
        <!-- .....................................................33333333333333333................................................... -->
        <table height="160px" class="bottom-table">
          <tr>
            <td>
              <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
              <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')"/>
            </td>
          </tr>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
        <tr>
          <td width="10%" align="right">检测：</td>
          <td width="15%" align="left"></td>
          <td width="10%" align="right">记录：</td>
          <td width="15%" align="left"></td>
          <td width="10%" align="right">复核：</td>
          <td align="left" width="15%"></td>
          <td width="10%">日期：</td>
          <td align="left" width="15%">
            <div style="display: inline-block; margin-left: 20px">年</div>
            <div style="display: inline-block; margin-left: 20px">月</div>
            <div style="display: inline-block; margin-left: 20px">日</div>
          </td>
        </tr>
        </tbody>
      </table>
    </div>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <ba-qj-detail-view ref="baQjDetailViewRef" :excelId="excelId" :shiyjcrq="form.shiyjcrq"
                       @select="selectBaQjDetail"></ba-qj-detail-view>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType"></bs-judge-base-view>
  </div>
</template>

<script>
import {
  listKfTlsxzsjlbBsInfo,
  getKfTlsxzsjlbBsInfo,
  delKfTlsxzsjlbBsInfo,
  addKfTlsxzsjlbBsInfo,
  updateKfTlsxzsjlbBsInfo
} from "@/api/report_kf/kfTlsxzsjlbBsInfo";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BaQjDetailView from "@/views/sycs/baQjDetail/BaQjDetailView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView.vue";

import decimal from "@/utils/big-decimal";
// handlePaste
import {handleFocus, emptyConvert, handleKeyDown, handlePaste} from "@/views/reportForms/utils";
import Bus from "@/utils/bus";

export default {
  name: "tlsxzsjlb",
  components: {
    BsInstrumentView,
    BaQjDetailView,
    BsJiancyjView,
    BsJudgeBaseView
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    syType: {
      type: [String, Number],
      default: () => ""
    },
    page: {
      type: Number,
      default: () => 0
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    printEmpty: {
      type: Boolean,
      default: () => false
    }
  },
  data() {
    return {
      params: {},
      query: {},
      // 表单参数
      form: {

        baDetailVos1: [{}, {}, {}, {}, {}, {}],
        baDetailVos2: [{}, {}]
      }
    };
  },
  watch: {
    isPdf(newVal, oldVal) {
      this.form = {...emptyConvert(this.form, newVal)};
    }
  },
  created() {
    this.getInfo();
  },
  methods: {
    // 获取详情
    getInfo() {
      getKfTlsxzsjlbBsInfo(this.excelId || this.$defaultExcelId).then((response) => {
        this.form = response.data;
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
      });
    },
    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
      Bus.$emit("setTgBgJiancyj", {jiancyj: this.form.jiancyj, jiancyjIds: this.form.jiancyjIds});
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
       this.form.pandyjIds = info.ids;
      this.form.pandyj = info.label;
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
      Bus.$emit("setTgBgZhuyyqsbmcjbh", {zhuyyqsbmcjbh: this.form.zhuyyqsbmcjbh, shebIds: this.form.shebIds});
    },
    // 显示盒号列表
    showBaQjDetailView(type) {
      this.collectHehId();
      this.$refs.baQjDetailViewRef.init(type, this.form.hehIdList);
    },
    // 盒号选择
    selectBaQjDetail(type, obj) {
      this.form["heh" + type] = obj.hh;
      this.form["heh" + type + "Id"] = obj.detailId;
      this.form["hezl" + type] = obj.quality;
      this.calculate(type);
    },
    // 计算
    calculate(type) {
      console.log(type);

      if (!this.form["hejstzl" + type] || !this.form["hejgtzl" + type]) {
        this.form["shuifzl" + type] = "";
        this.form["gantzl" + type] = "";
        this.form["hansl" + type] = "";
        this.calculateHanslpjz(type);
        return;
      }
      // 水分质量(g) = (盒+湿土质量(g)) -(盒+干土质量(g))
      this.form["shuifzl" + type] = decimal.subtract(this.form["hejstzl" + type], this.form["hejgtzl" + type]);
      if (!this.form["hezl" + type]) {
        this.form["gantzl" + type] = "";
        this.form["hansl" + type] = "";
        this.calculateHanslpjz(type);
        return;
      }
      // 干土质量（g） = (盒+干土质量(g)) -(盒质量(g))
      this.form["gantzl" + type] = decimal.subtract(this.form["hejgtzl" + type], this.form["hezl" + type]);
      // 含水率(%) = (水分质量(g)) -(干土质量（g）) * 100%
      this.form["hansl" + type] = decimal.divide(decimal.multiply(this.form["shuifzl" + type], 100), this.form["gantzl" + type], 1);
      this.calculateHanslpjz(type);
    },
    // 计算平均含水率
    // calculateHanslpjz(type) {
    //   if (type.length < 2) {
    //     return;
    //   }
    //   const str = [...type][0];
    //   if (!this.form["hansl" + str + "1"] || !this.form["hansl" + str + "2"]) {
    //     this.form["hanslpjz" + str] = "";
    //     return;
    //   }
    //   // 含水率平均值(%) = (J+K)/2
    //   this.form["hanslpjz" + str] = decimal.divide(decimal.add(this.form["hansl" + str + "1"], this.form["hansl" + str + "2"]), 2, 1);
    //   if (str == 1) {
    //     this.setTgBgHansl();
    //   }
    // },
    // // 给报告传值含水率
    // setTgBgHansl() {
    //   if (this.page != 0 || !this.form.hanslpjz1) {
    //     return;
    //   }
    //   // Bus.$emit("setTgBgHansl", this.form.hanslpjz1);
    //   Bus.$emit("setTgBgJiancjg", [{key: 1, value: this.form.hanslpjz1}]);
    // },
    // // 汇总盒号id
    // collectHehId() {
    //   const arr = ["11", "12", "21", "22", "31", "32", "41", "42"];
    //   let hehIdList = [];
    //   arr.forEach((item) => {
    //     if (this.form["heh" + item + "Id"]) {
    //       hehIdList.push(this.form["heh" + item + "Id"]);
    //     }
    //   });
    //   this.form.hehIdList = hehIdList;
    // },
    submitForm() {
      return this.form;
    },
    // handleFocus(event) {
    //   handleFocus(event, this.page, this.form[event]);
    // },
    // handleKeyDown(event, rowIndex, colIndex) {
    //   const maxArr = [7, 7];
    //   const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
    //   if (this.$refs[ref]) {
    //     this.$refs[ref].focus();
    //   }
    // },
    // handlePaste(event, rowIndex, colIndex) {
    //   const nameAllArr = [
    //     ["hejstzl11", "hejstzl12", "hejstzl21", "hejstzl22", "hejstzl31", "hejstzl32", "hejstzl41", "hejstzl42"],
    //     ["hejgtzl11", "hejgtzl12", "hejgtzl21", "hejgtzl22", "hejgtzl31", "hejgtzl32", "hejgtzl41", "hejgtzl42"]
    //   ];
    //   const methodsAllArr = [
    //     ["calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate"],
    //     ["calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate", "calculate"]
    //   ];
    //   const data = handlePaste(event, rowIndex, colIndex, nameAllArr, methodsAllArr, [], []);
    //   const {cols, nameSetArr, methodsSetArr} = data;
    //   for (let a = 0; a < nameSetArr.length; a++) {
    //     for (let b = 0; b < nameSetArr[a].length; b++) {
    //       this.$set(this.form, [nameSetArr[a][b]], cols[a][b]);
    //     }
    //   }
    //   for (let a = 0; a < methodsSetArr.length; a++) {
    //     for (let b = 0; b < methodsSetArr[a].length; b++) {
    //       // calculate方法，截取2位小数
    //       this.setCalculate(methodsSetArr[a][b], this.getLastTwoChars(nameSetArr[a][b], -2));
    //     }
    //   }
    // },
    // getLastTwoChars(str, num) {
    //   return str.slice(num);
    // },
    // // 计算方法调用
    // setCalculate(name, valObj) {
    //   this[name](valObj);
    // }
  }
};
</script>

<style scoped lang="scss">
.td-height1 {
  height: calc(100% / 12);
}

.td1 {
  width: calc(100% / 12 * 1);
}

.td2 {
  width: calc(100% / 12 * 2);
}

.td3 {
  width: calc(100% / 12 * 3);
}

.td4 {
  width: calc(100% / 12 * 4);
}

.td5 {
  width: calc(100% / 12 * 5);
}

.td8 {
  width: calc(100% / 12 * 8);
}

.td12 {
  width: calc(100%);
}
</style>
